package com.ce.util;

import java.sql.ResultSet;
import java.sql.SQLException;

import com.ce.framework.datamaintain.logic.ISQLMapper;

public class EsayUISelectOption {
	
	private String id;
	
	private String text;
	
	private boolean selected;
	
	public static ISQLMapper mapper1 = new ISQLMapper(){
		public Object fromSQLQuery(ResultSet rs, int num) {
			EsayUISelectOption o = new EsayUISelectOption();
			try {
				o.setId(rs.getString(1));
				o.setText(rs.getString(1));
			} catch (SQLException e) {
				e.printStackTrace();
			}
			return o;
		}
	};

	public static ISQLMapper mapper2 = new ISQLMapper(){
		public Object fromSQLQuery(ResultSet rs, int num) {
			EsayUISelectOption o = new EsayUISelectOption();
			try {
				o.setId(rs.getString(1));
				o.setText(rs.getString(2));
			} catch (SQLException e) {
				e.printStackTrace();
			}
			return o;
		}
	};

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public boolean isSelected() {
		return selected;
	}

	public void setSelected(boolean selected) {
		this.selected = selected;
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}
	
}
